abstract class Animal3 {
    Animal3() {
        System.out.println("Animal constructor");
    }

    abstract void sound();
}

class Dog3 extends Animal3 {
    Dog3() {
        super();  // 调用父类构造方法
        System.out.println("Dog constructor");
    }

    @Override
    void sound() {
        System.out.println("Dog barks");
    }
}

public class abstract_Main3{
    public static void main(String args[]){
        Animal3 dog = new Dog3();
        dog.sound();
    }

}